mod esop;
mod upload;
mod xlsx;

use super::{
    err, err_value, get_dir, json, ok, throw_err, Client, ECode, Part, Resp, VBase, VMap, Value,
};
use upload::save_file;

pub async fn do_cmd(cmd: &str, data: &mut Part, client: &Client) -> Resp {
    match cmd {
        "upload" => upload::do_cmd(data).await,
        "xlsx" => xlsx::do_cmd(data).await,
        "esop" => esop::do_cmd(data, client).await,
        _ => throw_err!(ECode::NoServe, "no cmd"),
    }
}
